package com.xuecheng.orders.model.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author 勾新杰
 * @version 1.0
 * @description 创建商品订单
 * @date 2022/10/4 10:21
 */
@Data
@ApiModel(description = "添加订单请求参数")
public class AddOrderDTO {

    /**
     * 总价
     */
    @NotNull(message = "总价不能为空")
    @ApiModelProperty(value = "总价")
    private Float totalPrice;

    /**
     * 订单类型
     */
    @NotBlank(message = "订单类型不能为空")
    @ApiModelProperty(value = "订单类型")
    private String orderType;

    /**
     * 订单名称
     */
    @NotBlank(message = "订单名不能为空")
    @ApiModelProperty(value = "订单名")
    private String orderName;

    /**
     * 订单描述
     */
    @NotBlank(message = "订单详情不能为空")
    @ApiModelProperty(value = "订单详情")
    private String orderDescrip;

    /**
     * 订单明细json，不可为空
     * [{"goodsId":"","goodsType":"","goodsName":"","goodsPrice":"","goodsDetail":""},{...}]
     */
    @NotBlank(message = "订单明细不能为空")
    @ApiModelProperty(value = "订单明细")
    private String orderDetail;

    /**
     * 外部系统业务id
     */
    @NotBlank(message = "外部系统业务id不能为空")
    @ApiModelProperty(value = "外部系统业务id")
    private String outBusinessId;
}
